const db = require('./04db.js');
db('select * from books where id=?',1,(err,result)=>{
    if(err || result.affectedRows <= 0){
        console.log('查询失败');
        
    }else{
        console.log('查询成功');
        console.log(result);
        
    }
})